Optimal. Leaf size=200 \[ -\frac {2 (e f-d g) \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{e^2 (d+e x)^2 (2 c d-b e)}-\frac {\sqrt {d (c d-b e)-b e^2 x-c e^2 x^2} (b e g-4 c d g+2 c e f)}{e^2 (2 c d-b e)}-\frac {(b e g-4 c d g+2 c e f) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 \sqrt {c} e^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {792, 664, 621, 204} \begin {gather*} -\frac {2 (e f-d g) \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{e^2 (d+e x)^2 (2 c d-b e)}-\frac {\sqrt {d (c d-b e)-b e^2 x-c e^2 x^2} (b e g-4 c d g+2 c e f)}{e^2 (2 c d-b e)}-\frac {(b e g-4 c d g+2 c e f) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 \sqrt {c} e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 621
Rule 664
Rule 792
Rubi steps
\begin {align*} \int \frac {(f+g x) \sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}}{(d+e x)^2} \, dx &=-\frac {2 (e f-d g) \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{e^2 (2 c d-b e) (d+e x)^2}-\frac {(2 c e f-4 c d g+b e g) \int \frac {\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}}{d+e x} \, dx}{e (2 c d-b e)}\\ &=-\frac {(2 c e f-4 c d g+b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{e^2 (2 c d-b e)}-\frac {2 (e f-d g) \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{e^2 (2 c d-b e) (d+e x)^2}+\frac {((-2 c d+b e) (2 c e f-4 c d g+b e g)) \int \frac {1}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx}{2 e (2 c d-b e)}\\ &=-\frac {(2 c e f-4 c d g+b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{e^2 (2 c d-b e)}-\frac {2 (e f-d g) \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{e^2 (2 c d-b e) (d+e x)^2}+\frac {((-2 c d+b e) (2 c e f-4 c d g+b e g)) \operatorname {Subst}\left (\int \frac {1}{-4 c e^2-x^2} \, dx,x,\frac {-b e^2-2 c e^2 x}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}}\right )}{e (2 c d-b e)}\\ &=-\frac {(2 c e f-4 c d g+b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{e^2 (2 c d-b e)}-\frac {2 (e f-d g) \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{e^2 (2 c d-b e) (d+e x)^2}-\frac {(2 c e f-4 c d g+b e g) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{2 \sqrt {c} e^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.71, size = 185, normalized size = 0.92 \begin {gather*} \frac {\sqrt {(d+e x) (c (d-e x)-b e)} \left (-\frac {\sqrt {e} (b e-2 c d) (3 d g-2 e f+e g x)}{d+e x}-\frac {\sqrt {e (2 c d-b e)} (b e g-4 c d g+2 c e f) \sin ^{-1}\left (\frac {\sqrt {c} \sqrt {e} \sqrt {d+e x}}{\sqrt {e (2 c d-b e)}}\right )}{\sqrt {c} \sqrt {d+e x} \sqrt {\frac {b e-c d+c e x}{b e-2 c d}}}\right )}{e^{5/2} (2 c d-b e)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 2.29, size = 265, normalized size = 1.32 \begin {gather*} -\frac {\sqrt {-c e^2} (b e g-4 c d g+2 c e f) \log \left (b^2 e^2-8 c x \sqrt {-c e^2} \sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2}-4 b c d e-4 b c e^2 x+4 c^2 d^2-8 c^2 e^2 x^2\right )}{4 c e^3}+\frac {\sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2} (3 d g-2 e f+e g x)}{e^2 (d+e x)}+\frac {(b e g-4 c d g+2 c e f) \tan ^{-1}\left (\frac {\sqrt {c} \left (2 \sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2}-2 x \sqrt {-c e^2}\right )}{b e}\right )}{2 \sqrt {c} e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.97, size = 399, normalized size = 2.00 \begin {gather*} \left [-\frac {{\left (2 \, c d e f - {\left (4 \, c d^{2} - b d e\right )} g + {\left (2 \, c e^{2} f - {\left (4 \, c d e - b e^{2}\right )} g\right )} x\right )} \sqrt {-c} \log \left (8 \, c^{2} e^{2} x^{2} + 8 \, b c e^{2} x - 4 \, c^{2} d^{2} + 4 \, b c d e + b^{2} e^{2} + 4 \, \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (2 \, c e x + b e\right )} \sqrt {-c}\right ) - 4 \, \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (c e g x - 2 \, c e f + 3 \, c d g\right )}}{4 \, {\left (c e^{3} x + c d e^{2}\right )}}, \frac {{\left (2 \, c d e f - {\left (4 \, c d^{2} - b d e\right )} g + {\left (2 \, c e^{2} f - {\left (4 \, c d e - b e^{2}\right )} g\right )} x\right )} \sqrt {c} \arctan \left (\frac {\sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (2 \, c e x + b e\right )} \sqrt {c}}{2 \, {\left (c^{2} e^{2} x^{2} + b c e^{2} x - c^{2} d^{2} + b c d e\right )}}\right ) + 2 \, \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (c e g x - 2 \, c e f + 3 \, c d g\right )}}{2 \, {\left (c e^{3} x + c d e^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 880, normalized size = 4.40 \begin {gather*} -\frac {b c d e g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{\left (-b \,e^{2}+2 c d e \right ) \sqrt {c \,e^{2}}}+\frac {b c \,e^{2} f \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{\left (-b \,e^{2}+2 c d e \right ) \sqrt {c \,e^{2}}}+\frac {2 c^{2} d^{2} g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{\left (-b \,e^{2}+2 c d e \right ) \sqrt {c \,e^{2}}}-\frac {2 c^{2} d e f \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{\left (-b \,e^{2}+2 c d e \right ) \sqrt {c \,e^{2}}}-\frac {b g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{2 \sqrt {c \,e^{2}}}+\frac {c d g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{\sqrt {c \,e^{2}}\, e}+\frac {2 \sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}\, c d g}{\left (-b \,e^{2}+2 c d e \right ) e}-\frac {2 \sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}\, c f}{-b \,e^{2}+2 c d e}+\frac {2 \left (-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )\right )^{\frac {3}{2}} d g}{\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )^{2} e^{3}}-\frac {2 \left (-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )\right )^{\frac {3}{2}} f}{\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )^{2} e^{2}}+\frac {\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}\, g}{e^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (f+g\,x\right )\,\sqrt {c\,d^2-b\,d\,e-c\,e^2\,x^2-b\,e^2\,x}}{{\left (d+e\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- \left (d + e x\right ) \left (b e - c d + c e x\right )} \left (f + g x\right )}{\left (d + e x\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________